package com.cpit.qualitycontrol.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Transient;

@Entity
@IdClass(ProjectOrganizationPK.class)
public class ProjectOrganization {

    /**
     *项目id
     */
    @Id
    private Long projectId;
    /**
     *组织id
     */
    @Id
    private Integer organizationId;
    @Transient
    private String  organizationName;

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public Integer getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }

    public String getOrganizationName() {
        return organizationName;
    }

    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }

    @Override
    public String toString() {
        return "ProjectOrganization{" +
                "projectId=" + projectId +
                ", organizationId=" + organizationId +
                ", organizationName='" + organizationName + '\'' +
                '}';
    }
}
